import request from '@/utils/request/index'
// base64 转获取加密
export const passwdEncoding = (data: any, formData: any): Promise<any> =>
    request.post('/wl-portal/portal/login/web/passwd/encoding', data, formData)
// 登录 密码
export const accountLogin = (data: any, formData: any) =>
    request.post('/wl-portal/portal/login/pwd/login', data, formData)

// 获取验证密码

export const getRegisterVerityCode = (data: any, formData: any): Promise<any> =>
    request.get('/authCenter/auth/sentRegisterVerityCode', data, formData)

// 修改密码

export const editPassword = (data: any) => request.post('/authCenter/api/updatePassword', data)
export const sentForgetVerityCode = (data: any) =>
    request.get('/authCenter/forget/sentForgetVerityCode', data)

export const changePassword = (data: any): Promise<any> =>
    request.post('/wl-portal/portal/login/forget/changePassword', data)

// 注册的时候 验证码获
export const sentRegisterVerityCode = (data: any): Promise<any> =>
    request.get('/authCenter/auth/sentRegisterVerityCode', data)

export const registerMember = (data: any): Promise<any> =>
    request.post('/authCenter/auth/registerMember', data)

export const getUserInfo = (): Promise<any> => request.get('/wl-portal/portal/account/info')

// 微信授权登录

export const WXLogin = (data: any): Promise<any> =>
    request.post('/wl-portal/portal/login/render/login', data)
